<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    520. Detect Capital
   </h1>
   <p>
    Given a word, you need to judge whether the usage of capitals in it is right or not.
   </p>
   <p>
    We define the usage of capitals in a word to be right when one of the following cases holds:
   </p>
   <ol>
    <li>
     All letters in this word are capitals, like "USA".
    </li>
    <li>
     All letters in this word are not capitals, like "leetcode".
    </li>
    <li>
     Only the first letter in this word is capital if it has more than one letter, like "Google".
    </li>
   </ol>
   Otherwise, we define that this word doesn't use capitals in a right way.
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> "USA"
<b>Output:</b> True
</pre>
   <p>
    <b>
     Example 2:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> "FlaG"
<b>Output:</b> False
</pre>
   <p>
    <b>
     Note:
    </b>
    The input will be a non-empty word consisting of uppercase and lowercase latin letters.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    520. 检测大写字母
   </h1>
   <p>
    给定一个单词，你需要判断单词的大写使用是否正确。
   </p>
   <p>
    我们定义，在以下情况时，单词的大写用法是正确的：
   </p>
   <ol>
    <li>
     全部字母都是大写，比如"USA"。
    </li>
    <li>
     单词中所有字母都不是大写，比如"leetcode"。
    </li>
    <li>
     如果单词不只含有一个字母，只有首字母大写，&nbsp;比如&nbsp;"Google"。
    </li>
   </ol>
   <p>
    否则，我们定义这个单词没有正确使用大写字母。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> "USA"
<strong>输出:</strong> True
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> "FlaG"
<strong>输出:</strong> False
</pre>
   <p>
    <strong>
     注意:
    </strong>
    输入是由大写和小写拉丁字母组成的非空单词。
   </p>
  </div>
 </body>
</html>